package com.mapapp.flutter_mapapp.widget;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.mapapp.flutter_mapapp.R;

import razerdp.basepopup.BasePopupWindow;

public class UploadDataProgressDialog extends BasePopupWindow {

    private TextView tvProgress;


    public UploadDataProgressDialog(Context context) {
        super(context);
    }

    @Override
    public View onCreateContentView() {
        View view = createPopupById(R.layout.dialog_upload_data_progress);
        tvProgress = view.findViewById(R.id.tv_progress);
        return view;
    }

    public void setProgress(int current, int total) {
        tvProgress.setText("正在上传" + current + "/" + total);
    }

    @Override
    public BasePopupWindow setOutSideDismiss(boolean outSideDismiss) {
        return super.setOutSideDismiss(false);
    }

    @Override
    public boolean onBackPressed() {
        return false;
    }
}
